Skip to content

Refine/upgrade to 5.x#436

Open
iceljc wants to merge 23 commits intoSciSharp:mainfrom
iceljc:refine/upgrade-to-5.x
Open

Refine/upgrade to 5.x#436
iceljc wants to merge 23 commits intoSciSharp:mainfrom
iceljc:refine/upgrade-to-5.x

Conversation

@iceljc
Copy link
Copy Markdown
Collaborator

@iceljc iceljc commented Mar 27, 2026

No description provided.

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Upgrade codebase to Svelte 5 with native HTML and modern reactive patterns

✨ Enhancement

Grey Divider

Walkthroughs

Description
  Comprehensive upgrade of the Svelte codebase from version 4 to version 5, implementing modern
  reactive patterns and removing deprecated UI component libraries.
  **Key Changes:**
• Migrated all state management to Svelte 5 $state(), $derived(), and $effect() runes across
  40+ components
• Replaced @sveltestrap/sveltestrap components with native HTML elements and Bootstrap utility
  classes throughout the application
• Converted event handlers from on: directive syntax to lowercase on attribute syntax (e.g.,
  on:clickonclick)
• Replaced createEventDispatcher with callback props for component communication
• Updated component props to use Svelte 5 $props() rune with destructuring and JSDoc type
  definitions
• Converted slot-based composition to Svelte 5 snippet syntax in relevant components
• Replaced store subscriptions with $effect() rune for automatic reactivity
• Removed svelte-link imports and replaced with native anchor elements
• Updated svelte-ignore comments to new naming convention (e.g., a11y-*a11y_*)
• Implemented custom dropdown components and dynamic positioning to replace Sveltestrap dropdowns
• Removed deprecated lifecycle hooks (onDestroy) in favor of $effect() cleanup
• Deleted obsolete knowledge-base related components (Storage.svelte, FileLeftBar.svelte,
  FileLists.svelte, upload-document.svelte)
Diagram
flowchart LR
  A["Svelte 4<br/>Components"] -->|"Replace Sveltestrap<br/>with native HTML"| B["Native HTML<br/>+ Bootstrap"]
  A -->|"Migrate state<br/>management"| C["$state/$derived<br/>/$effect runes"]
  A -->|"Update event<br/>handlers"| D["on* attributes<br/>instead of on:"]
  A -->|"Convert props<br/>pattern"| E["$props() rune<br/>with JSDoc"]
  B --> F["Svelte 5<br/>Codebase"]
  C --> F
  D --> F
  E --> F
Loading

Grey Divider

File Changes

1. src/routes/chat/[agentId]/[conversationId]/chat-box.svelte ✨ Enhancement +308/-253

Svelte 5 migration with state runes and custom dropdowns

• Migrated from Svelte 4 to Svelte 5 with new $state(), $derived(), and $effect() runes
• Replaced $page store with page state object from $app/state
• Removed @sveltestrap/sveltestrap Dropdown components, replaced with custom dropdown using
 clickoutsideDirective
• Updated event handlers from on: directives to on prefixed attributes (e.g., on:clickonclick)
• Simplified boolean checks (e.g., !!!value!value)
• Added new state variables isHeaderMenuOpen, isHeaderStatesOpen, and openMsgActionId for
 dropdown management

src/routes/chat/[agentId]/[conversationId]/chat-box.svelte


2. src/lib/common/shared/TimeRangePicker.svelte ✨ Enhancement +340/-121

Svelte 5 migration with native HTML and dynamic positioning

• Migrated to Svelte 5 with $state(), $derived.by(), and $effect() runes
• Replaced createEventDispatcher with callback prop onchange
• Removed @sveltestrap/sveltestrap Button and Input components, using native HTML elements
• Replaced Flatpickr component with direct flatpickr library instantiation in $effect
• Implemented dynamic dropdown positioning using fixed positioning to escape overflow clipping
• Updated event handlers from on: directives to on prefixed attributes

src/lib/common/shared/TimeRangePicker.svelte


3. src/routes/page/users/user-item.svelte ✨ Enhancement +420/-418

Svelte 5 migration with native form elements

• Migrated to Svelte 5 with $state(), $derived(), and $effect() runes
• Replaced createEventDispatcher with callback prop onsave
• Removed @sveltestrap/sveltestrap Button and Input components, using native HTML elements
• Updated event handlers from on: directives to on prefixed attributes
• Changed svelte-ignore comments from a11y-* to a11y_* format
• Fixed permission binding to use array index directly instead of destructuring

src/routes/page/users/user-item.svelte


View more (123)
4. src/routes/page/roles/role-item.svelte ✨ Enhancement +348/-362

Svelte 5 migration with native form elements

• Migrated to Svelte 5 with $state(), $derived(), and $effect() runes
• Replaced createEventDispatcher with callback prop onsave
• Removed @sveltestrap/sveltestrap Button and Input components, using native HTML elements
• Updated event handlers from on: directives to on prefixed attributes
• Changed svelte-ignore comments from a11y-* to a11y_* format
• Fixed permission binding to use array index directly

src/routes/page/roles/role-item.svelte


5. src/lib/common/shared/GlobalHeader.svelte ✨ Enhancement +14/-22

Svelte 5 migration with effect-based store subscriptions

• Migrated to Svelte 5 with $effect() runes replacing manual store subscriptions
• Removed onDestroy lifecycle hook and manual unsubscriber cleanup
• Replaced export let with $props() and $bindable() for reactive props
• Simplified store subscription logic using $effect() for automatic reactivity

src/lib/common/shared/GlobalHeader.svelte


6. src/routes/page/knowledge-base/documents/+page.svelte ✨ Enhancement +178/-178

Upgrade to Svelte 5 with state runes and native HTML elements

• Removed @sveltestrap/sveltestrap component imports and replaced with native HTML elements and
 custom components
• Migrated all state variables to use Svelte 5 $state rune for reactive state management
• Converted reactive declarations ($:) to use $derived and $derived.by for computed values
• Replaced event handlers from on: directive syntax to on attribute syntax (e.g., on:click to
 onclick)
• Updated component event bindings to use callback props instead of event dispatchers
• Replaced Tooltip component with custom BotsharpTooltip component
• Changed form inputs and buttons to native HTML elements with Bootstrap classes

src/routes/page/knowledge-base/documents/+page.svelte


7. src/routes/page/knowledge-base/question-answer/+page.svelte ✨ Enhancement +156/-154

Upgrade to Svelte 5 with state runes and native HTML elements

• Removed @sveltestrap/sveltestrap component imports and replaced with native HTML elements
• Migrated all state variables to use Svelte 5 $state rune
• Converted reactive declarations ($:) to use $derived and $derived.by for computed values
• Replaced event handlers from on: directive to on attribute syntax
• Updated component event bindings to use callback props
• Replaced Tooltip with custom BotsharpTooltip component
• Converted form components to native HTML with Bootstrap styling

src/routes/page/knowledge-base/question-answer/+page.svelte


8. src/routes/(authentication)/login/+page.svelte ✨ Enhancement +249/-275

Upgrade login page to Svelte 5 with native HTML elements

• Removed svelte-link and @sveltestrap/sveltestrap component imports
• Migrated all state variables to use Svelte 5 $state rune
• Replaced all Sveltestrap components with native HTML elements and Bootstrap classes
• Changed event handlers from on: directive to on attribute syntax
• Simplified password visibility toggle using showPassword state variable
• Updated form submission and event handling to use native HTML form elements
• Changed import from $app/stores to $app/state for page store

src/routes/(authentication)/login/+page.svelte


9. src/routes/page/knowledge-base/common/indexes/vector-index-modal.svelte ✨ Enhancement +212/-262

Refactor modal to use Svelte 5 props and native HTML

• Removed @sveltestrap/sveltestrap component imports and replaced with native HTML modal structure
• Converted component props to use Svelte 5 $props() rune with destructuring
• Migrated state variables to use $state rune
• Replaced Modal, ModalHeader, ModalBody, ModalFooter components with native HTML div
 structure
• Changed event handlers from on: directive to on attribute syntax
• Updated form elements to use native HTML with Bootstrap classes
• Added fade transition using Svelte's transition:fade directive

src/routes/page/knowledge-base/common/indexes/vector-index-modal.svelte


10. src/lib/common/files/FileDropZone.svelte ✨ Enhancement +136/-98

Upgrade FileDropZone to Svelte 5 props and snippets

• Converted component props to use Svelte 5 $props() rune with comprehensive JSDoc type
 definitions
• Migrated all state variables to use $state rune
• Replaced createEventDispatcher with callback props (ondragenter, ondrop, etc.)
• Converted reactive declarations ($:) to use $derived.by for computed values
• Changed event handlers from on: directive to on attribute syntax
• Replaced <slot> with Svelte 5 snippet syntax using children prop
• Updated function composition helpers to work with new event handler syntax

src/lib/common/files/FileDropZone.svelte


11. src/lib/common/audio-player/AudioPlayer.svelte ✨ Enhancement +118/-106

Upgrade AudioPlayer to Svelte 5 props and effects

• Converted component props to use Svelte 5 $props() rune with comprehensive JSDoc type
 definitions
• Migrated all state variables to use $state rune
• Replaced createEventDispatcher with callback props (ondispatch, ondestroy)
• Converted reactive declarations ($:) to use $derived and $effect for computed values and
 side effects
• Changed event handlers from on: directive to on attribute syntax
• Updated svelte-ignore comments to use new naming convention (e.g.,
 a11y_click_events_have_key_events)
• Replaced player?.paused checks with paused state variable

src/lib/common/audio-player/AudioPlayer.svelte


12. src/lib/common/shared/RightSidebar.svelte ✨ Enhancement +57/-24

Upgrade RightSidebar to Svelte 5 props and native HTML

• Removed svelte-link import and replaced with native anchor element
• Converted component props to use Svelte 5 $props() rune with JSDoc type definitions
• Changed event handlers from on: directive to on attribute syntax
• Updated svelte-ignore comments to use new naming convention
• Added JSDoc comments for function parameters
• Added TypeScript ignore comments for OverlayScrollbars type issues

src/lib/common/shared/RightSidebar.svelte


13. src/lib/common/shared/LiveChatEntry.svelte ✨ Enhancement +8/-7

Upgrade LiveChatEntry to Svelte 5 state rune

• Migrated all state variables to use Svelte 5 $state rune
• Changed event handlers from on: directive to on attribute syntax
• Updated self-closing iframe tag to use proper closing tag syntax

src/lib/common/shared/LiveChatEntry.svelte


14. src/routes/page/agent/[agentId]/build/components/LlmProviders/AzureOpenAI.svelte ✨ Enhancement +1/-1

Add JSDoc type annotation to processor function

• Added JSDoc type annotation to arrow function parameter for better type safety

src/routes/page/agent/[agentId]/build/components/LlmProviders/AzureOpenAI.svelte


15. src/routes/page/conversation/+page.svelte ✨ Enhancement +130/-115

Upgrade to Svelte 5 with native HTML and Bootstrap

• Removed @sveltestrap/sveltestrap component imports and replaced with native HTML elements and
 Bootstrap classes
• Migrated reactive variables to Svelte 5 $state() rune for state management
• Updated event handlers from on: directives to on lowercase attributes (e.g., on:click to
 onclick)
• Replaced component-based UI (Button, Card, Row, Col, Table, Input) with semantic HTML and
 Bootstrap utility classes
• Added inline styles for table cell truncation and improved code formatting

src/routes/page/conversation/+page.svelte


16. src/routes/page/knowledge-base/common/vector-table/vector-item-edit-modal.svelte ✨ Enhancement +209/-214

Migrate modal to native HTML with Svelte 5 runes

• Migrated from @sveltestrap/sveltestrap Modal components to native HTML modal with Svelte
 transitions
• Converted component props to Svelte 5 $props() rune with destructuring
• Replaced reactive declarations ($:) with $derived() and $effect() runes
• Updated event handlers to lowercase on attributes and replaced createEventDispatcher with
 direct function calls
• Replaced form components with native HTML elements (textarea, input, select)

src/routes/page/knowledge-base/common/vector-table/vector-item-edit-modal.svelte


17. src/routes/page/dashboard/+page.svelte ✨ Enhancement +111/-136

Convert dashboard to native HTML with Svelte 5

• Removed @sveltestrap/sveltestrap component imports and replaced with native HTML elements
• Migrated reactive variables to Svelte 5 $state() rune
• Replaced component-based layout (Row, Col, Card, Image) with semantic HTML and Bootstrap classes
• Updated event handlers from on: directives to lowercase on attributes
• Simplified store subscription logic and removed unused modal state

src/routes/page/dashboard/+page.svelte


18. src/routes/page/knowledge-base/documents/knowledge-document-upload.svelte ✨ Enhancement +122/-113

Refactor document upload component to Svelte 5

• Removed @sveltestrap/sveltestrap imports and replaced with native HTML form elements
• Migrated component props to Svelte 5 $props() rune with bindable properties
• Replaced createEventDispatcher with direct callback function invocations
• Updated reactive declarations to use $derived() and $effect() runes
• Converted slot-based component composition to Svelte 5 snippet syntax

src/routes/page/knowledge-base/documents/knowledge-document-upload.svelte


19. src/routes/page/users/+page.svelte ✨ Enhancement +137/-149

Upgrade users page to Svelte 5 with native HTML

• Removed @sveltestrap/sveltestrap component imports and replaced with native HTML and Bootstrap
 classes
• Migrated reactive variables to Svelte 5 $state() rune
• Updated event handlers from on: directives to lowercase on attributes
• Replaced component-based UI (Button, Card, Row, Col, Table, Input) with semantic HTML
• Fixed store import from $app/stores to $app/state

src/routes/page/users/+page.svelte


20. src/lib/common/dropdowns/Select.svelte ✨ Enhancement +112/-118

Refactor Select dropdown to Svelte 5 runes

• Migrated component props to Svelte 5 $props() rune with destructuring
• Replaced createEventDispatcher with direct callback function invocation
• Converted reactive declarations ($:) to $effect() and $derived() runes
• Updated event handlers from on: directives to lowercase on attributes
• Replaced @sveltestrap/sveltestrap Input component with native HTML input elements

src/lib/common/dropdowns/Select.svelte


21. src/lib/common/modals/StateModal.svelte ✨ Enhancement +154/-116

Convert StateModal to native HTML with Svelte 5

• Replaced @sveltestrap/sveltestrap Modal components with native HTML modal structure
• Migrated component props to Svelte 5 $props() rune with bindable state
• Converted reactive declarations to $effect() rune
• Updated event handlers to lowercase on attributes
• Replaced form components with native HTML elements and Bootstrap classes

src/lib/common/modals/StateModal.svelte


22. src/routes/page/instruction/testing/+page.svelte ✨ Enhancement +77/-92

Upgrade instruction testing page to Svelte 5

• Removed @sveltestrap/sveltestrap component imports and replaced with native HTML and Bootstrap
 classes
• Migrated reactive variables to Svelte 5 $state() rune
• Updated event handlers from on: directives to lowercase on attributes
• Replaced component-based layout (Row, Col, Card) with semantic HTML
• Improved event handler parameter passing with explicit detail objects

src/routes/page/instruction/testing/+page.svelte


23. src/routes/page/agent/[agentId]/agent-components/utilities/agent-utility-item.svelte ✨ Enhancement +79/-81

Refactor agent utility item to Svelte 5

• Migrated component props to Svelte 5 $props() rune with destructuring
• Replaced createEventDispatcher with direct callback function invocations
• Updated event handlers from on: directives to lowercase on attributes
• Replaced @sveltestrap/sveltestrap Input component with native HTML elements
• Improved accessibility with proper role and tabindex attributes

src/routes/page/agent/[agentId]/agent-components/utilities/agent-utility-item.svelte


24. src/lib/common/files/FileGallery.svelte ✨ Enhancement +45/-47

Upgrade FileGallery to Svelte 5 snippets

• Migrated component props to Svelte 5 $props() rune with snippet support
• Replaced slot-based composition with Svelte 5 snippet syntax
• Updated event handlers from on: directives to lowercase on attributes
• Improved code organization and removed legacy export declarations

src/lib/common/files/FileGallery.svelte


25. src/lib/common/files/MessageFileGallery.svelte ✨ Enhancement +18/-16

Refactor MessageFileGallery to Svelte 5

• Migrated component props to Svelte 5 $props() rune with destructuring
• Replaced reactive variable declarations with $state() rune
• Simplified prop initialization with default values in destructuring

src/lib/common/files/MessageFileGallery.svelte


26. .env Additional files +4/-1

...

.env


27. .npmrc Additional files +1/-0

...

.npmrc


28. package.json Additional files +19/-16

...

package.json


29. src/app.css Additional files +2/-0

...

src/app.css


30. src/lib/common/audio-player/AudioSpeaker.svelte Additional files +2/-3

...

src/lib/common/audio-player/AudioSpeaker.svelte


31. src/lib/common/audio-player/MessageAudioPlayer.svelte Additional files +31/-29

...

src/lib/common/audio-player/MessageAudioPlayer.svelte


32. src/lib/common/audio-player/store.js Additional files +6/-2

...

src/lib/common/audio-player/store.js


33. src/lib/common/dropdowns/FullScreenDropdown.svelte Additional files +16/-7

...

src/lib/common/dropdowns/FullScreenDropdown.svelte


34. src/lib/common/dropdowns/LanguageDropdown.svelte Additional files +40/-25

...

src/lib/common/dropdowns/LanguageDropdown.svelte


35. src/lib/common/dropdowns/NotificationDropdown.svelte Additional files +53/-34

...

src/lib/common/dropdowns/NotificationDropdown.svelte


36. src/lib/common/dropdowns/ProfileDropdown.svelte Additional files +49/-36

...

src/lib/common/dropdowns/ProfileDropdown.svelte


37. src/lib/common/embedding/EmbeddingPage.svelte Additional files +22/-30

...

src/lib/common/embedding/EmbeddingPage.svelte


38. src/lib/common/errors/error-500.svelte Additional files +27/-30

...

src/lib/common/errors/error-500.svelte


39. src/lib/common/files/AudioGallery.svelte Additional files +16/-14

...

src/lib/common/files/AudioGallery.svelte


40. src/lib/common/markdown/CodeBlock.svelte Additional files +13/-15

...

src/lib/common/markdown/CodeBlock.svelte


41. src/lib/common/markdown/Markdown.svelte Additional files +20/-23

...

src/lib/common/markdown/Markdown.svelte


42. src/lib/common/modals/DialogModal.svelte Additional files +87/-75

...

src/lib/common/modals/DialogModal.svelte


43. src/lib/common/modals/PlainModal.svelte Additional files +57/-32

...

src/lib/common/modals/PlainModal.svelte


44. src/lib/common/nav-bar/NavBar.svelte Additional files +11/-18

...

src/lib/common/nav-bar/NavBar.svelte


45. src/lib/common/nav-bar/NavItem.svelte Additional files +43/-83

...

src/lib/common/nav-bar/NavItem.svelte


46. src/lib/common/shared/Breadcrumb.svelte Additional files +10/-14

...

src/lib/common/shared/Breadcrumb.svelte


47. src/lib/common/shared/BubbleChat.svelte Additional files +14/-20

...

src/lib/common/shared/BubbleChat.svelte


48. src/lib/common/shared/ChartColorsArray.svelte Additional files +10/-4

...

src/lib/common/shared/ChartColorsArray.svelte


49. src/lib/common/shared/CodeScript.svelte Additional files +49/-80

...

src/lib/common/shared/CodeScript.svelte


50. src/lib/common/shared/CollapsibleCard.svelte Additional files +14/-16

...

src/lib/common/shared/CollapsibleCard.svelte


51. src/lib/common/shared/HeadTitle.svelte Additional files +6/-3

...

src/lib/common/shared/HeadTitle.svelte


52. src/lib/common/shared/InPlaceEdit.svelte Additional files +26/-30

...

src/lib/common/shared/InPlaceEdit.svelte


53. src/lib/common/shared/Label.svelte Additional files +18/-17

...

src/lib/common/shared/Label.svelte


54. src/lib/common/shared/PlainPagination.svelte Additional files +41/-34

...

src/lib/common/shared/PlainPagination.svelte


55. src/lib/common/shared/RemoteSearchInput.svelte Additional files +66/-49

...

src/lib/common/shared/RemoteSearchInput.svelte


56. src/lib/common/shared/StateSearch.svelte Additional files +44/-22

...

src/lib/common/shared/StateSearch.svelte


57. src/lib/common/shared/Stretch.svelte Additional files +30/-27

...

src/lib/common/shared/Stretch.svelte


58. src/lib/common/shared/TablePagination.svelte Additional files +36/-31

...

src/lib/common/shared/TablePagination.svelte


59. src/lib/common/spinners/Loader.svelte Additional files +14/-4

...

src/lib/common/spinners/Loader.svelte


60. src/lib/common/spinners/LoadingDots.svelte Additional files +34/-34

...

src/lib/common/spinners/LoadingDots.svelte


61. src/lib/common/spinners/LoadingToComplete.svelte Additional files +28/-16

...

src/lib/common/spinners/LoadingToComplete.svelte


62. src/lib/common/tooltip/BotsharpTooltip.svelte Additional files +88/-107

...

src/lib/common/tooltip/BotsharpTooltip.svelte


63. src/lib/scss/_variables-dark.scss Additional files +27/-27

...

src/lib/scss/_variables-dark.scss


64. src/lib/scss/_variables.scss Additional files +312/-312

...

src/lib/scss/_variables.scss


65. src/lib/scss/app.scss Additional files +21/-21

...

src/lib/scss/app.scss


66. src/lib/scss/bootstrap.scss Additional files +4/-4

...

src/lib/scss/bootstrap.scss


67. src/lib/scss/custom/common/_common.scss Additional files +12/-12

...

src/lib/scss/custom/common/_common.scss


68. src/lib/scss/custom/components/_accordion.scss Additional files +5/-5

...

src/lib/scss/custom/components/_accordion.scss


69. src/lib/scss/custom/components/_audio.scss Additional files +4/-4

...

src/lib/scss/custom/components/_audio.scss


70. src/lib/scss/custom/components/_avatar.scss Additional files +5/-5

...

src/lib/scss/custom/components/_avatar.scss


71. src/lib/scss/custom/components/_badge.scss Additional files +6/-6

...

src/lib/scss/custom/components/_badge.scss


72. src/lib/scss/custom/components/_breadcrumb.scss Additional files +6/-6

...

src/lib/scss/custom/components/_breadcrumb.scss


73. src/lib/scss/custom/components/_buttons.scss Additional files +10/-10

...

src/lib/scss/custom/components/_buttons.scss


74. src/lib/scss/custom/components/_card.scss Additional files +4/-4

...

src/lib/scss/custom/components/_card.scss


75. src/lib/scss/custom/components/_codeScript.scss Additional files +1/-1

...

src/lib/scss/custom/components/_codeScript.scss


76. src/lib/scss/custom/components/_demos.scss Additional files +8/-8

...

src/lib/scss/custom/components/_demos.scss


77. src/lib/scss/custom/components/_dropdown.scss Additional files +6/-6

...

src/lib/scss/custom/components/_dropdown.scss


78. src/lib/scss/custom/components/_file.scss Additional files +3/-3

...

src/lib/scss/custom/components/_file.scss


79. src/lib/scss/custom/components/_forms.scss Additional files +9/-9

...

src/lib/scss/custom/components/_forms.scss


80. src/lib/scss/custom/components/_helper.scss Additional files +6/-6

...

src/lib/scss/custom/components/_helper.scss


81. src/lib/scss/custom/components/_nav.scss Additional files +5/-5

...

src/lib/scss/custom/components/_nav.scss


82. src/lib/scss/custom/components/_pagination.scss Additional files +5/-5

...

src/lib/scss/custom/components/_pagination.scss


83. src/lib/scss/custom/components/_preloader.scss Additional files +4/-4

...

src/lib/scss/custom/components/_preloader.scss


84. src/lib/scss/custom/components/_print.scss Additional files +5/-5

...

src/lib/scss/custom/components/_print.scss


85. src/lib/scss/custom/components/_progress.scss Additional files +8/-8

...

src/lib/scss/custom/components/_progress.scss


86. src/lib/scss/custom/components/_reboot.scss Additional files +8/-8

...

src/lib/scss/custom/components/_reboot.scss


87. src/lib/scss/custom/components/_root.scss Additional files +17/-17

...

src/lib/scss/custom/components/_root.scss


88. src/lib/scss/custom/components/_table.scss Additional files +3/-3

...

src/lib/scss/custom/components/_table.scss


89. src/lib/scss/custom/components/_widgets.scss Additional files +3/-3

...

src/lib/scss/custom/components/_widgets.scss


90. src/lib/scss/custom/fonts/_fonts.scss Additional files +4/-4

...

src/lib/scss/custom/fonts/_fonts.scss


91. src/lib/scss/custom/pages/_agent.scss Additional files +3/-3

...

src/lib/scss/custom/pages/_agent.scss


92. src/lib/scss/custom/pages/_authentication.scss Additional files +8/-8

...

src/lib/scss/custom/pages/_authentication.scss


93. src/lib/scss/custom/pages/_chat.scss Additional files +7/-7

...

src/lib/scss/custom/pages/_chat.scss


94. src/lib/scss/custom/pages/_coming-soon.scss Additional files +3/-3

...

src/lib/scss/custom/pages/_coming-soon.scss


95. src/lib/scss/custom/pages/_contacts.scss Additional files +5/-5

...

src/lib/scss/custom/pages/_contacts.scss


96. src/lib/scss/custom/pages/_ecommerce.scss Additional files +8/-8

...

src/lib/scss/custom/pages/_ecommerce.scss


97. src/lib/scss/custom/pages/_extras-pages.scss Additional files +6/-6

...

src/lib/scss/custom/pages/_extras-pages.scss


98. src/lib/scss/custom/pages/_file-manager.scss Additional files +4/-4

...

src/lib/scss/custom/pages/_file-manager.scss


99. src/lib/scss/custom/pages/_instruction.scss Additional files +1/-1

...

src/lib/scss/custom/pages/_instruction.scss


100. src/lib/scss/custom/pages/_jobs.scss Additional files +4/-4

...

src/lib/scss/custom/pages/_jobs.scss


101. src/lib/scss/custom/pages/_knowledgebase.scss Additional files +14/-14

...

src/lib/scss/custom/pages/_knowledgebase.scss


102. src/lib/scss/custom/pages/_projects.scss Additional files +5/-5

...

src/lib/scss/custom/pages/_projects.scss


103. src/lib/scss/custom/pages/_timeline.scss Additional files +4/-4

...

src/lib/scss/custom/pages/_timeline.scss


104. src/lib/scss/custom/plugins/_apexcharts.scss Additional files +4/-4

...

src/lib/scss/custom/plugins/_apexcharts.scss


105. src/lib/scss/custom/plugins/_bootstrap-touchspin.scss Additional files +4/-4

...

src/lib/scss/custom/plugins/_bootstrap-touchspin.scss


106. src/lib/scss/custom/plugins/_calendar-full.scss Additional files +3/-3

...

src/lib/scss/custom/plugins/_calendar-full.scss


107. src/lib/scss/custom/plugins/_colorpicker.scss Additional files +5/-5

...

src/lib/scss/custom/plugins/_colorpicker.scss


108. src/lib/scss/custom/plugins/_datatable.scss Additional files +3/-3

...

src/lib/scss/custom/plugins/_datatable.scss


109. src/lib/scss/custom/plugins/_datepicker.scss Additional files +5/-5

...

src/lib/scss/custom/plugins/_datepicker.scss


110. src/lib/scss/custom/plugins/_echarts.scss Additional files +5/-5

...

src/lib/scss/custom/plugins/_echarts.scss


111. src/lib/scss/custom/plugins/_form-editors.scss Additional files +5/-5

...

src/lib/scss/custom/plugins/_form-editors.scss


112. src/lib/scss/custom/plugins/_form-upload.scss Additional files +5/-5

...

src/lib/scss/custom/plugins/_form-upload.scss


113. src/lib/scss/custom/plugins/_form-wizard.scss Additional files +8/-8

...

src/lib/scss/custom/plugins/_form-wizard.scss


114. src/lib/scss/custom/plugins/_google-map.scss Additional files +5/-5

...

src/lib/scss/custom/plugins/_google-map.scss


115. src/lib/scss/custom/plugins/_icons.scss Additional files +4/-4

...

src/lib/scss/custom/plugins/_icons.scss


116. src/lib/scss/custom/plugins/_leaflet-maps.scss Additional files +4/-4

...

src/lib/scss/custom/plugins/_leaflet-maps.scss


117. src/lib/scss/custom/plugins/_parsley.scss Additional files +5/-5

...

src/lib/scss/custom/plugins/_parsley.scss


118. src/lib/scss/custom/plugins/_range-slider.scss Additional files +4/-4

...

src/lib/scss/custom/plugins/_range-slider.scss


119. src/lib/scss/custom/plugins/_rating.scss Additional files +5/-5

...

src/lib/scss/custom/plugins/_rating.scss


120. src/lib/scss/custom/plugins/_responsive-table.scss Additional files +5/-5

...

src/lib/scss/custom/plugins/_responsive-table.scss


121. src/lib/scss/custom/plugins/_select2.scss Additional files +6/-6

...

src/lib/scss/custom/plugins/_select2.scss


122. src/lib/scss/custom/plugins/_session-timeout.scss Additional files +4/-4

...

src/lib/scss/custom/plugins/_session-timeout.scss


123. src/lib/scss/custom/plugins/_sparkline-chart.scss Additional files +3/-3

...

src/lib/scss/custom/plugins/_sparkline-chart.scss


124. src/lib/scss/custom/plugins/_sweatalert2.scss Additional files +4/-4

...

src/lib/scss/custom/plugins/_sweatalert2.scss


125. src/lib/scss/custom/plugins/_switch.scss Additional files +3/-3

...

src/lib/scss/custom/plugins/_switch.scss


126. Additional files not shown Additional files +0/-0

...

Additional files not shown


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review bot commented Mar 27, 2026

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0) 📎 Requirement gaps (0) 📐 Spec deviations (0)

Grey Divider


Action required

1. Select label not updating 🐞 Bug ✓ Correctness
Description
Select.svelte no longer updates displayText (and select-all state) when users change selections
because changeDisplayText() is only invoked inside a $effect that is triggered by props and is
explicitly untracked. As a result, the displayed selection can remain stale until the parent
re-publishes selectedValues.
Code

src/lib/common/dropdowns/Select.svelte[R74-109]

+    $effect(() => {
+        // track options, selectedValues, and loadMore as triggers
+        const _opts = options;
+        const _sv = selectedValues;
+        const _lm = loadMore;
+
+        if (_lm) {
+            // Apply selectedValues verification first
+            const currentInner = untrack(() => innerOptions);
+            let newInner = verifySelectedOptions(currentInner, _sv);
+            let newRef = verifySelectedOptions(currentInner, _sv);
+
+            // Append any new options not yet present
+            if (_opts.length > newRef.length) {
+                const curKeys = newRef.map(x => x.value);
+                const addedOptions = _opts.filter(x => !curKeys.includes(x.value)).map(x => ({
+                    label: x.label,
+                    value: x.value,
+                    checked: false
+                }));
+                newInner = [...newInner, ...addedOptions];
+                newRef = [...newRef, ...addedOptions];
            }
+
+            innerOptions = newInner;
+            refOptions = newRef;
        } else {
-            innerOptions = verifySelectedOptions(options, selectedValues);
-            refOptions = verifySelectedOptions(options, selectedValues);
+            innerOptions = verifySelectedOptions(_opts, _sv);
+            refOptions = verifySelectedOptions(_opts, _sv);
        }
-    }

-    $: {
-        if (innerOptions && refOptions) {
+        untrack(() => {
            applySearchFilter();
            changeDisplayText();
-        }
-    }
+        });
+    });
Evidence
changeDisplayText() is called only inside a $effect that intentionally tracks only
options/selectedValues/loadMore, and the call is wrapped in untrack, so internal state changes
won’t retrigger it. User interactions update innerOptions/refOptions but never call
changeDisplayText(), so the UI can desync until the parent updates props.

src/lib/common/dropdowns/Select.svelte[74-109]
src/lib/common/dropdowns/Select.svelte[187-224]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`Select.svelte` updates internal selection state (`innerOptions/refOptions`) on user interaction, but it does not update `displayText` at that time. `displayText` is only recomputed in a `$effect` that tracks prop changes, so the UI can show stale text (and stale select-all state) until the parent round-trips `selectedValues`.

### Issue Context
This is a behavioral regression introduced by moving the former reactive block into a `$effect` + `untrack(...)`.

### Fix Focus Areas
- src/lib/common/dropdowns/Select.svelte[74-109]
- src/lib/common/dropdowns/Select.svelte[187-224]

### Suggested fix
Choose one of these approaches:
1) Call `changeDisplayText()` (and possibly `verifySelectAll()` if you keep it separate) at the end of `checkOption`, `checkSelectAll`, and `clearSelection` after mutating `innerOptions/refOptions`.
2) Add a separate `$effect` that *tracks* `refOptions`/`innerOptions` (do not `untrack` the reads) and calls `changeDisplayText()` so UI derives from internal state, regardless of whether the parent updates `selectedValues` immediately.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Flatpickr recreated on change 🐞 Bug ⛯ Reliability
Description
TimeRangePicker.svelte initializes flatpickr in a $effect that also reads
tempStartDate/tempEndDate, while onChange updates those same states. This makes the effect rerun
on each date selection, destroying and recreating the flatpickr instance repeatedly.
Code

src/lib/common/shared/TimeRangePicker.svelte[R90-123]

+	// Initialize/destroy flatpickr when the container element is available
+	$effect(() => {
+		const el = flatpickrContainerEl;
+		if (el) {
+			const instance = flatpickr(el, {
+				mode: 'range',
+				dateFormat: 'Y-m-d',
+				inline: true,
+				allowInput: false,
+				onChange: (/** @type {Date[]} */ selectedDates) => {
+					if (selectedDates.length === 1) {
+						tempStartDate = formatDateForFlatpickr(selectedDates[0]);
+						tempEndDate = '';
+					} else if (selectedDates.length === 2) {
+						tempStartDate = formatDateForFlatpickr(selectedDates[0]);
+						tempEndDate = formatDateForFlatpickr(selectedDates[1]);
+					}
+				}
+			});
+			flatpickrInstance = instance;
+
+			// Set initial dates if available
+			if (tempStartDate && tempEndDate) {
+				instance.setDate([tempStartDate, tempEndDate], false);
+			} else if (tempStartDate) {
+				instance.setDate([tempStartDate], false);
+			}
+
+			return () => {
+				instance.destroy();
+				flatpickrInstance = null;
+			};
+		}
+	});
Evidence
The flatpickr init $effect reads tempStartDate/tempEndDate to set initial dates, and its
onChange handler updates those state variables. In Svelte reactivity, that causes the $effect to
rerun, triggering cleanup (instance.destroy()) and re-initialization during normal user
interaction.

src/lib/common/shared/TimeRangePicker.svelte[91-123]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The flatpickr instance is created/destroyed inside a `$effect` that depends on `tempStartDate/tempEndDate`. Since the flatpickr `onChange` updates these values, selecting a date causes the effect cleanup to run and the instance to be recreated, which can cause flicker/jank and risks subtle selection issues.

### Issue Context
The `$effect` should depend only on the container element lifecycle (mount/unmount), not on the selected-date state.

### Fix Focus Areas
- src/lib/common/shared/TimeRangePicker.svelte[91-123]

### Suggested fix
Refactor into two effects:
- **Init effect**: depends only on `flatpickrContainerEl` (do not read `tempStartDate/tempEndDate` inside it). Create instance and return cleanup to destroy.
- **Sync effect**: when `flatpickrInstance` exists and `tempStartDate/tempEndDate` change, call `flatpickrInstance.setDate([...], false)`.

Alternative: keep a single init effect but wrap reads of `tempStartDate/tempEndDate` in `untrack(...)` so they don’t become dependencies that trigger teardown/recreate.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Advisory comments

3. Peer conflicts masked 🐞 Bug ⛯ Reliability
Description
.npmrc enables legacy-peer-deps=true, which can conceal real peer dependency incompatibilities
during the major framework upgrade and lead to non-reproducible installs across environments. This
increases the likelihood of CI/local mismatches and runtime issues from incompatible package graphs.
Code

.npmrc[R1-2]

engine-strict=true
+legacy-peer-deps=true
Evidence
The repo now forces npm to ignore peer dependency resolution failures, which can allow incompatible
versions to install silently (especially risky during a Svelte/Vite major upgrade).

.npmrc[1-2]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`legacy-peer-deps=true` suppresses peer dependency resolution errors, making it easier to ship an incompatible dependency tree.

### Issue Context
During a major upgrade (Svelte 5 / Vite 6), peer constraints are particularly important signals.

### Fix Focus Areas
- .npmrc[1-2]

### Suggested fix
Prefer removing `legacy-peer-deps=true` and resolving peer conflicts explicitly. If it must remain temporarily, scope it to local development docs rather than enforcing it repo-wide, and add a comment explaining the exact blocking peer conflict and a plan to remove it.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment on lines +74 to +109
$effect(() => {
// track options, selectedValues, and loadMore as triggers
const _opts = options;
const _sv = selectedValues;
const _lm = loadMore;

if (_lm) {
// Apply selectedValues verification first
const currentInner = untrack(() => innerOptions);
let newInner = verifySelectedOptions(currentInner, _sv);
let newRef = verifySelectedOptions(currentInner, _sv);

// Append any new options not yet present
if (_opts.length > newRef.length) {
const curKeys = newRef.map(x => x.value);
const addedOptions = _opts.filter(x => !curKeys.includes(x.value)).map(x => ({
label: x.label,
value: x.value,
checked: false
}));
newInner = [...newInner, ...addedOptions];
newRef = [...newRef, ...addedOptions];
}

innerOptions = newInner;
refOptions = newRef;
} else {
innerOptions = verifySelectedOptions(options, selectedValues);
refOptions = verifySelectedOptions(options, selectedValues);
innerOptions = verifySelectedOptions(_opts, _sv);
refOptions = verifySelectedOptions(_opts, _sv);
}
}

$: {
if (innerOptions && refOptions) {
untrack(() => {
applySearchFilter();
changeDisplayText();
}
}
});
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Select label not updating 🐞 Bug ✓ Correctness

Select.svelte no longer updates displayText (and select-all state) when users change selections
because changeDisplayText() is only invoked inside a $effect that is triggered by props and is
explicitly untracked. As a result, the displayed selection can remain stale until the parent
re-publishes selectedValues.
Agent Prompt
### Issue description
`Select.svelte` updates internal selection state (`innerOptions/refOptions`) on user interaction, but it does not update `displayText` at that time. `displayText` is only recomputed in a `$effect` that tracks prop changes, so the UI can show stale text (and stale select-all state) until the parent round-trips `selectedValues`.

### Issue Context
This is a behavioral regression introduced by moving the former reactive block into a `$effect` + `untrack(...)`.

### Fix Focus Areas
- src/lib/common/dropdowns/Select.svelte[74-109]
- src/lib/common/dropdowns/Select.svelte[187-224]

### Suggested fix
Choose one of these approaches:
1) Call `changeDisplayText()` (and possibly `verifySelectAll()` if you keep it separate) at the end of `checkOption`, `checkSelectAll`, and `clearSelection` after mutating `innerOptions/refOptions`.
2) Add a separate `$effect` that *tracks* `refOptions`/`innerOptions` (do not `untrack` the reads) and calls `changeDisplayText()` so UI derives from internal state, regardless of whether the parent updates `selectedValues` immediately.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant